import request from '@/utils/request';

export async function getSpareInfoByPage (params: any) {
    return request('/api/device/getSpareInfoByPage', {
    method: 'POST',
    data: params,
  });
}



export async function addSpareInfo (params: any) {
    return request('/api/device/addSpareInfo', {
    method: 'POST',
    data: params,
  });
}

export async function updateSpareInfo (params: any) {
    return request('/api/device/updateSpareInfo', {
    method: 'POST',
    data: params,
  });
}

export async function delSpareInfo (params: any) {
    return request('/api/device/delSpareInfo', {
    method: 'POST',
    data: params,
  });
}


export async function exportSpareInfo(params: any) {
    return request('/api/device/exportSpareInfo', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}
export default { getSpareInfoByPage, addSpareInfo, updateSpareInfo, delSpareInfo, exportSpareInfo }
